The Window Manager supports nine standard window types and eight standard floating window types. You can create windows of the standard types by passing one of the window definition ID enumerators to NewCWindow (NewCWindow) or NewWindow (NewWindow) . You can also use these enumerators to specify one of the standard window types in a window resource; see "The Window Resource" for details.
A window definition ID incorporates both the window's definition function and its variation code. The resource ID of the window definition function is stored in the upper 12 bits of the integer, and the variation code is stored in the lower 4 bits.
These are the window definition IDs for the standard window types:
enum { /* window definition IDs for standard window types */
documentProc = 0, /* standard document dialog box */
dBoxProc = 1, /* alert box or modal dialog box */
plainDBox = 2, /* plain box */
altDBoxProc = 3, /* plain box with shadow */
noGrowDocProc = 4, /* movable window, no size box or zoom box */
movableDBoxProc = 5, /* movable modal dialog box */
zoomDocProc = 8, /* standard document window */
zoomNoGrow = 12, /* zoomable, nonresizable window */
rDocProc = 16 /* rounded-corner window */
};
You can also add a zoom box to a movable modal dialog box by specifying the sum of two constants: movableDBoxProc + zoomDocProc , but a zoom box is not recommended on any dialog box.
You can control the diameter of curvature of a rounded-corner window (window type rDocProc ) by adding one of these integers to the rDocProc constant:
rDocProc
|
|
rDocProc + 2
|
|
rDocProc + 4
|
|
rDocProc + 6
|
These are the window definition IDs for the standard floating window types:
enum { /* window definition IDs for standard floating window types */
floatProc = 1985, /* standard floating window */
floatGrowProc = 1987, /* resizable floating window */
floatZoomProc = 1989, /* zoomable floating window */
floatZoomGrowProc = 1991, /* zoomable, resizable floating
/* window */
floatSideProc = 1993, /* sideways floating window,
/* no size or zoom box */
floatSideGrowProc = 1995, /* sideways floating window
/* with grow box */
floatSideZoomProc = 1997, /* sideways floating window
/* with zoom box */
floatSideZoomGrowProc = 1999 /* sideways floating window
/* with grow box and zoom box */
};
These are the resource IDs for the standard window definition functions:
enum { /* resource IDs for standard window definition functions */
kStandardWindowDefinition = 0, /* for document windows and dialogs */
kRoundWindowDefinition = 1, /* DA-style window */
kFloatingWindowDefinition = 124 /* for floating windows */
};
These are the variant codes used with the standard and floating window definition functions:
enum {
/* for use with kStandardWindowDefinition */
kModalDialogVariantCode = 1, /* modal dialog variant code */
kMovableModalDialogVariantCode = 5, /* movable modal dialog
/* variant code */
/* for use with kFloatingWindowDefinition */
kSideFloaterVariantCode = 8 /* sideways floating window
/* variant code */
};